let mapleader=" "
syntax on				" 高亮
set number				" 设置行号
set wildmenu			" vim命令行支持tab提示
set hlsearch			" highlight search
exec "nohlsearch"	
	"execute nohlsearch when starting

set nocompatible
filetype on
filetype indent on
filetype plugin on
filetype plugin indent on
     

set tabstop=4			" Set the length of '/t' to 4 Space length
set softtabstop=4		" When in insert mode, every Tab equals four Space length
"set expandtab			" Use four Space to raplace a Tab

set incsearch			" search all
set ignorecase          " 忽略大小写，搜索很方便
set smartcase			" 全小写的方式可以全部搜到，但是混杂大写只能搜索到大小写匹配

noremap = nzz
noremap - Nzz
" noremap  n h			" 更改键位
noremap K 5k
noremap J 5j
noremap <LEADER><CR> :nohlsearch<CR> 

noremap sl :set splitright<CR>:vsplit<CR>
noremap sj :set nosplitright<CR>:vsplit<CR>
noremap si :set nosplitbelow<CR>:split<CR>
noremap sk :set splitbelow<CR>:split<CR>

map <LEADER>i <C-w>k
map <LEADER>j <C-w>h
map <LEADER>k <C-w>j
map <LEADER>l <C-w>l

" Resize splits with arrow keys
"map <up> :res +5<CR>
"map <down> :res -5<CR>
"map <left> :vertical resize-5<CR>
"map <right> :vertical resize+5<CR>



map S  :w<CR>			" 用大写S映射到:w保存 
map s  <nop>			" no operation
map Q  :q<CR>			" 退出
map R  :source $MYVIMRC<CR>	" 立即使当前配置文件生效
"  一些操作:
"   ci":删除“”中的所有内容，同理也可以使用d命令剪切双引号中的内容
"   fv 也就是find v :找紧接着v的位置，同理可以找其他字符
"	when in visual mode ,use ':' and input 'normal + instruct & motions you want' to operate these lines
"	Ctrl+v 可视块模式
"	在分屏下可以用:e  filename 来打开其他文件

call plug#begin('~/.vim/pluged')

Plug 'Valloric/YouCompleteMe'

call plug#end()

